package cn.tedu.basic;

import java.text.SimpleDateFormat;
import java.util.Date;
//测试 Date
public class Test3_Date {
    public static void main(String[] args) {
        //创建对象
        Date d =new Date();
        //调用方法
//        System.out.println(d.after(15021995);
//        System.out.println(d.before(200ms));
//        System.out.println(d.compareTo(1994,1996));
        System.out.println(d.clone());
        System.out.println(d.equals(1993));
        System.out.println(d.getTime());
        System.out.println(d.hashCode());
        System.out.println(d.toInstant());
        System.out.println(d.getClass());//获取类的对象
        System.out.println(d.getDay());
        System.out.println(d.toInstant());
        System.out.println(d.getHours());
        System.out.println(d.getMinutes());
        System.out.println(d.getMonth());
        System.out.println(d.getYear());
        System.out.println(d.toLocaleString());//获取日期格式
        //
        Date de =new Date();
        System.out.println( de.getMonth());
        System.out.println(de.getYear());
        System.out.println(de.getClass());
        System.out.println(de.getTime());
        System.out.println(de.getDay());


    }
}
